#ifndef LOGINPAGE_H
#define LOGINPAGE_H

#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QScreen>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include <QCheckBox>
#include "Zhuce.h"
namespace Ui {
class LoginPage;
}

class LoginPage : public QWidget//登陆页面
{
    Q_OBJECT

public:
    explicit LoginPage(QRect screenGeometry,QWidget *parent = nullptr);
    ~LoginPage();
    QLineEdit*getUser();
    QLineEdit*getPass();
    void setServerStatus(bool r);
    QString packToString(QString phone,QString pass);
public slots:
    void zhucePage();
signals:
    void connectServer(QString name,QString pass,QString ip,QString port);
    void disConnectServer();
    void sendServerData(QString str);
    void zhuCeStatus(bool r,QString reason);
private slots:
    void on_pLoginButton_clicked();

    void on_connect_clicked();


private:
    void setMLayout();//设置布局

private:
    Ui::LoginPage *ui;
    QRect screenGeometry;//屏幕大小
    QLabel welcomeLay;//欢迎字样
  //  QWidget *logWidget=nullptr;
//    QLineEdit *pUserLineEdit =nullptr;
//    QLineEdit *pPasswordLineEdit = nullptr;
//    QCheckBox *pRememberCheckBox = nullptr;
//    QCheckBox *pAutoLoginCheckBox = nullptr;
//    QPushButton *pLoginButton = nullptr;
//    QPushButton *pRegisterButton = nullptr;
//    QPushButton *pForgotButton = nullptr;
//    QGridLayout *pLayout=nullptr;

//    QLineEdit *pIpEdit =nullptr;
//    QLineEdit *pPortEdit = nullptr;
//    QLabel *ipLabel=nullptr;
//    QLabel *portLabel=nullptr;
    Zhuce *zhuCe=nullptr;
};

#endif // LOGINPAGE_H
